package com.tarry.thread.countdownlatch;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

public class DatabaseHealthChecker extends BaseHealthChecker {

    public DatabaseHealthChecker(CountDownLatch latch) {
        super(latch, "DatabaseHealthChecker");
    }

    @Override
    public void verifyService() {
        System.out.println("Checking " + super.getServiceName());
        try {
            TimeUnit.SECONDS.sleep(20);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(super.getServiceName() + " is up ...");
    }
}
